﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Pay.Data {
	public partial class ProfitDayMap
		: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<ProfitDay> {
		public ProfitDayMap() {
			// table
			ToTable("mc_ProfitDay", "dbo");

			// keys
			HasKey(t => t.Id);

			// Properties
			Property(t => t.Id)
				.HasColumnName("Id")
				.HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
				.IsRequired();
			Property(t => t.PayChannel)
				.HasColumnName("PayChannel")
				.IsRequired();
			Property(t => t.PayAmount)
				.HasColumnName("PayAmount")
				.HasPrecision(18, 6)
				.IsRequired();
			Property(t => t.OffAmount)
				.HasColumnName("OffAmount")
				.HasPrecision(18, 6)
				.IsRequired();
			Property(t => t.Balance)
				.HasColumnName("Balance")
				.HasPrecision(18, 6)
				.IsRequired();
			Property(t => t.Profit)
				.HasColumnName("Profit")
				.HasPrecision(18, 6)
				.IsRequired();
			Property(t => t.FeeCost)
				.HasColumnName("FeeCost")
				.HasPrecision(18, 6)
				.IsRequired();
			Property(t => t.SettleCost)
				.HasColumnName("SettleCost")
				.HasPrecision(18, 2)
				.IsRequired();
			Property(t => t.MerchantProfit)
				.HasColumnName("MerchantProfit")
				.HasPrecision(18, 6)
				.IsRequired();

			// Relationships
		}
	}
}